package com.spzx.order.api;

import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.order.api.factory.RemoteOrderFallbackFactory;
import com.spzx.order.domain.OrderInfo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(
        value = ServiceNameConstants.ORDER_SERVICE,//"spzx-order"
        fallbackFactory = RemoteOrderFallbackFactory.class
)
public interface RemoteOrderService {

    @Operation(summary = "确认支付 根据订单号获取订单详情")
    @GetMapping("/orderInfo/getOrderByOrderNo/{orderNo}")
    public R<OrderInfo> getOrderByOrderNo(@PathVariable("orderNo")String orderNo);
}
